﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.IO;
using System.Windows.Markup;

namespace WrWpf
{
    internal static class XamlHelper
    {
        public static T LoadXamlElement<T>(string path)
        {
            using (FileStream fs = new FileStream(path, FileMode.Open, FileAccess.Read, FileShare.Read))
            {
                // Get the root element, which we know is a T
                return (T)XamlReader.Load(fs);
            }
        }

        public static void Test()
        {
            
        }
    }
}
